apiVersion: apps/v1
kind: Deployment
metadata:
  name: github-client-deployment
  labels:
    app: github-client
spec:
  replicas: 1
  selector:
    matchLabels:
      app: github-client
  template:
    metadata:
      labels:
        app: github-client
    spec:
      containers:
      - name: github-client
        image: github-client:latest
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
  name: github-client-service
spec:
  selector:
    app: github-client
  ports:
  - protocol: TCP
    port: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: minimal-ingress
  annotations:
    ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
  - http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: nginx-service
            port:
              number: 80
